My meme

My meme is an interesting meme about coding. The motivation of creating this meme is that when I am coding, I think I’m good at it, but it turns to many errors when I actually running it. Besides, I saw a meme of tiger and cat online and I think it is cute so I use that idea into my meme.

library(magick)


# First square
first_text <- image_blank(width = 500, height = 500, color = "#000000") %>% image_annotate(text = "Before\n I run my code:",
                                                                                           color ="#FFFFFF", size = 60, font = "Impact", gravity = "center")
# Second square
happy_cat <- image_read("https://i.pinimg.com/736x/25/b2/5f/25b25ffbf2a0f7b325fb69cc47517a52.jpg") %>%image_resize("500x500!")


# Third square
second_text <- image_blank(width = 500, height = 500, color = "#000000") %>% image_annotate(text = "After\n I run my code", 
                                                                                           color ="#FFFFFF", size = 60,font = "Impact", gravity = "center")

# Forth square
sad_cat = image_read("https://i2.wp.com/i.pinimg.com/564x/98/fc/88/98fc8863c7e68df57cd7ad7442f0ec18.jpg") %>% image_resize("500x500!")


# combine first row
first_row = c(first_text, happy_cat) %>% image_append()

# combine second row
second_row = c(second_text, sad_cat) %>% image_append()

# final meme
meme = c(first_row, second_row) %>% image_append(stack = TRUE)
meme %>% image_write(meme, "my_meme.png")

My animated GIF

My animated GIF is about two cartoon characters playing tennis. The motivation of creating this animated GIF is that I saw this two characters online and I think they are really cute so I decide to make a tennis competition for them.

library(magick)
# read 4 images
pic1 = image_read("https://i.pinimg.com/564x/54/cf/d5/54cfd5a54d51918fb4c1de094efca1c1.jpg")
pic2 = image_read("https://i.pinimg.com/564x/83/7b/bd/837bbdafff03430acc5e706e9e8cf047.jpg")
pic3 = image_read("https://i.pinimg.com/564x/54/cf/d5/54cfd5a54d51918fb4c1de094efca1c1.jpg")
pic4 = image_read("https://i.pinimg.com/564x/83/7b/bd/837bbdafff03430acc5e706e9e8cf047.jpg")

# make text for 4 images
frame1 = pic1 %>% image_annotate(text = "I win!", size = 30, gravity = "north")
frame2 = pic2 %>% image_annotate(text = "I win!", size = 30, gravity = "north")
frame3 = pic3 %>% image_annotate(text = "You\n lose!", size = 30, gravity = "north")
frame4 = pic4 %>% image_annotate(text = "You\n lose!", size = 30, gravity = "north")

#combine above and make final GIF
frames <- c(frame1, frame2, frame3, frame4)
animation = image_animate(frames,fps = 1)
image_write(animation, "my_animation.gif")
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@1,300&family=Roboto:wght@300&family=Sono&display=swap');
h2 {font-family: 'Roboto', sans-serif; color:#006666}
body {font-family: 'Sono', sans-serif; background-color:#e6ffff}